package com.starleague.battletech.unit;

public interface IBattletechUnitEngine
        extends IBattletechUnitComponent
{
    BattletechUnitEngineType getEngineType();

    int getEngineRating();

    // String getModelName();
}

// protected static abstract class SerialData extends SerialObject.SerialData
// {
// final Engine.TYPE this.type;
// final int this.rating;
//
// protected SerialData(final SerialObject.SerialManager i_sobject_manager, final Engine i_engine)
// {
// super(i_sobject_manager, i_engine);
// _type = i_engine._type;
// _rating = i_engine._rating;
// }
// }

// protected Engine(final Engine.SerialData i_engine_data) //throws BattletechException
// {
// _type = i_engine_data._type;
// _rating = i_engine_data._rating;
//
// int ctons_chart_index = this.rating / 5;
//
// switch(_type)
// {
// case NORMAL:
// _ctons = this.ctons_chart[ctons_chart_index][0];
// break;
// case XL_IS:
// case XL_CLAN:
// _ctons = this.ctons_chart[ctons_chart_index][1];
// break;
// default:
// _ctons = 0;
// }
// }
/*
 * final static float[] ENGINE_RATINGS = { 0.0f, 0.25f, 10: 0.5f, 0.5f, 0.5f, 0.5f, 30: 1.0f, 1.0f, 1.0f, 1.0f, 1.5f,
 * 1.5f, 1.5f, 2.0f, 2.0f, 2.0f, 2.5f, 2.5f, 3.0f, 3.0f, 3.0f, 3.5f, 3.5f, 4.0f, 4.0f, 4.0f, 4.5f, 4.5f, 5.0f, 5.0f,
 * 5.5f, 5.5f, 6.0f, 6.0f, 6.0f, 7.0f, 7.0f, 7.5f, 7.5f, 8.0f, 8.5f,
 * 
 * 8.5f, 9.0f, 9.5f, 10.0f, 10.0f, 10.5f, 11.0f, 11.5f, 12.0f, 12.5f, 13.0f, 13.5f, 14.0f, 14.5f, 15.5f, 16.0f, 16.5f,
 * 17.5f, 18.0f, 19.0f, 19.5f, 10.5f, 21.5f, 22.5f, 23.5f, 24.5f, 25.5f, 27.0f, 28.5f, 29.5f, 31.5f, 33.0f, 34.5f,
 * 36.5f, 38.5f, 41.0f, 43.5f, 46.0f, 49.0f, 52.5f,
 * 
 * 56.5f, 61.0f, 66.5f, 72.5f, 79.5f, 87.5f, 97.0f, 107.5f, 119.5f, 133.5f, 150.0f, 168.5f, 190.0f, 214.5f, 243.0f,
 * 275.5f, 313.0f, 356.0f, 405.5f, 462.5f };
 */

// @Override
// boolean IsValidHitLocationTYPE(final battletech.HitLocation.TYPE i_hit_location_type)
// {
// switch(i_hit_location_type)
// {
// case CENTER_TORSO:
// return true;
// case SIDE_TORSO:
// switch(_type)
// {
// case XL_IS:
// case XL_CLAN:
// return true;
// case NORMAL:
// }
// //return false; <= easier to just fall through here
// case HEAD:
// case ARM:
// case LEG:
// }
// return false;
// }
//
// boolean IsFunctional() { return this.functional; }

//
//
//

// @Override
// int getNumCriticalSlots() { return 0; }

// final int getCTons() { return this.ctons; }
/*
 * { switch(_type) { case NORMAL: return this.centitons_chart[_centitons_chart_index][0]; case XL_IS: case XL_CLAN:
 * return this.centitons_chart[_centitons_chart_index][1]; }
 * 
 * // NOTE: This should NEVER happen (switch should always succeed), but is here for the compiler! return -1; }
 */

// protected Engine(final battletech.Engine.TYPE i_type, final int i_rating) throws BattletechException
// {
// if ((i_rating % 5) != 0)
// throw new BattletechException("battletech.mech.Engine.ctor(): Engine rating [" +
// i_rating + "] not divisible by 5");
//
// int ctons_chart_index = i_rating / 5;
//
// if ((ctons_chart_index < 0)
// || (ctons_chart_index >= this.ctons_chart.length)
// || (_ctons_chart[ctons_chart_index] == null))
// throw new BattletechException("battletech.mech.Engine.ctor(): Engine rating [" +
// i_rating + "] out of range [Max " + (_ctons_chart.length * 5) + "]");
//
// _type = i_type;
// _rating = i_rating;
//
// int tmp_ctons = 0;
// switch(_type)
// {
// case NORMAL:
// tmp_ctons = this.ctons_chart[ctons_chart_index][0];
// break;
// case XL_IS:
// case XL_CLAN:
// tmp_ctons = this.ctons_chart[ctons_chart_index][1];
// break;
// }
//
// _ctons = tmp_ctons;
// }
//
// //private final int this.ctons;
// }
